﻿@model List<CMP.ERP.Model.Stock>
@{
    Layout = null;
}
@Html.Action("Account_Show", "Account");
<div class="content">
    <div class="right" id="mainFrame">
        <div class="right_cont">
            @*<div class="header">
                <div class="header-right">
                    <form method="post" action="/Brand/AddCommodityTypeDo">
                        <div id="modal-container-973559" class="modal hide fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="width:400px; margin-left:-150px;">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                <h3 id="myModalLabel">
                                    商品新增系统
                                </h3>
                            </div>
                            <div class="modal-body">
                                <table class="table table-hover table-bordered " style="width:400px;text-align:center;margin:0 auto;border:2px solid #428bca;">
                                    <tbody>
                                        <tr>
                                            <th>购买的商品</th>
                                            <td>@Html.DropDownList("Commodity_Id")</td>
                                        </tr>
                                        <tr>
                                            <th>仓库名称</th>
                                            <td>@Html.DropDownList("WareHose_Id")</td>
                                        </tr>
                                        <tr>
                                            <th>库存数量</th>
                                            <td>@Html.TextBox("Stock_Num")</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <div class="modal-footer">
                                <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button> <button type="submit" class="btn btn-default"><span class="icon-inbox"></span>保存</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>*@
            <!-- 顶部 -->

            <div id="middle">
                <div id="middle">
                    <div class="Switch"></div>
                    <script type="text/javascript">
                        $(document).ready(function (e) {
                            $(".Switch").click(function () {
                                $(".left").toggle();
                            });
                        });
                    </script>

                    <div class="right" id="mainFrame">

                        <div class="right_cont">
                            <ul class="breadcrumb">
                                当前位置：
                                <a href="/Home/Index">首页</a>
                                <span class="divider">/</span>
                                库存信息
                            </ul>
                            <div style="width:100%;">
                                <div style=" margin-top:10px">
                                <form action="/Stock/SearchByName" method="get">
                                    <table>
                                        <tr>
                                            <td>商品名称:</td>
                                            <td><input type="text" name="Commodity_Name" /></td>
                                            <td>仓库名称:</td>
                                            <td>@Html.DropDownList("WareHose_Id", "请选择")</td>
                                            <td><button type="submit" class="btn btn-default" style="margin-bottom:10px"><span class="icon-search"></span>查询 </button></td>
                                        </tr>
                                    </table>
                                </form>
                            </div>
                                <div style="margin-top:20px;">
                                    <table class="table  table-hover table-bordered table-striped">
                                        <thead>
                                            <tr>
                                                <th>库存编号</th>
                                                <th>商品名称</th>
                                                <th>仓库编号</th>
                                                <th>库存数量</th>
                                                <th>预订量</th>
                                                <th>操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            @foreach (var i in Model)
                                            {
                                                <tr>
                                                    <td>@i.Stock_Id</td>
                                                    <td>@i.Commodity_Name</td>
                                                    <td>@i.WareHose_Name</td>
                                                    <td>@i.Stock_Num</td>
                                                    <td>@i.Reserve_Num</td>
                                                    <td>
                                                        <a href="/Stock/UptStock/@i.Stock_Id" style="color:black"><span class="icon-edit"></span>更新</a>
                                                    </td>
                                                </tr>
                                            }

                                        </tbody>
                                    </table>
                                    <div style="margin-left:800px">
                                        <a href="/Stock/Stock_ShowPage/1">首页</a>
                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                        @{
                                            if (Convert.ToInt32(ViewBag.PageIndex) > 1)
                                            {
                                                <a href="/Stock/Stock_ShowPage/@(Convert.ToInt32(ViewBag.PageIndex-1))">上一页</a>
                                            }
                                            else
                                            {
                                                <span>上一页</span>
                                            }
                                        }
                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                        @{
                                            if (Convert.ToInt32(ViewBag.PageIndex) < Convert.ToInt32(ViewBag.count))
                                            {
                                                <a href="/Stock/Stock_ShowPage/@(Convert.ToInt32(ViewBag.PageIndex+1))">下一页</a>
                                            }
                                            else
                                            {
                                                <span>下一页</span>
                                            }
                                        }
                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                        <a href="/Stock/Stock_ShowPage/@ViewBag.count">尾页</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <script src="~/Scripts/lib/bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function () {
            $('.demo-cancel-click').click(function () { return false; });
        });
        function fun() {
            location.href = '/Home/Index';
        }
    </script>










